﻿using System.Web.Mvc;
using Nikola.Message;

namespace Nikola.Filter
{
    public class ExceptionFilter : FilterAttribute, IExceptionFilter
    {

        public void OnException(ExceptionContext filterContext)
        {
            LogManager.Writer(filterContext.Exception.Message, filterContext.Exception.StackTrace);
            //记录日志后跳转错误页面
            
            filterContext.HttpContext.Response.Redirect("/Shared");
        }
    }
}